import request from "@/utils/request";

export default {
  addSerivalNumber(SerialNumberForm) {
    return request({
      url: `/orderSerialNumber`,
      method: "post",
      data: SerialNumberForm,
    });
  },

  deleteSerialNumberById(serialNumber) {
    return request({
      url: `/orderSerialNumber/deleteById`,
      method: "delete",
      data: serialNumber,
    });
  },

  addSerialNumber(order) {
    return request({
      url: `/orderSerialNumber/addSerialNumber`,
      method: "post",
      data: order,
    });
  },

  // 调拨 {outWarehouseId：出库id，saveWarehouseId：入库Id，serialNumbers：序列号列表}
  TransferSerialNumber(transfer) {
    return request({
      url: `/orderSerialNumber/TransferSerialNumber`,
      method: "post",
      data: transfer,
    });
  },

  // 序列号出入库
  updateSerialNumber(serialNumbersAndStatus) {
    return request({
      url: `/orderSerialNumber/updateSerialNumberStatus`,
      method: "post",
      data: serialNumbersAndStatus,
    });
  },
};
